package com.qf.mybatis01.entity;

import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import java.io.Serializable;


@Data
@NoArgsConstructor
@AllArgsConstructor
public class Book implements Serializable {
    private Integer id;
    private String name;
    private  String author;
    private  String publish;
    private Integer sort;

    /**
     * 将book对象转换成 csv 字符串
     * @return
     */
    public String toCSVString(){
        return this.name+","+this.author+","+this.publish+","+this.sort;
    }
}
